<?php
/* Index Template */

/* Fetch admin options. */
global $options;
foreach ($options as $value) {
	if(isset($value['id']) && isset ($value['std']))
		if (get_option( $value['id'] ) === FALSE) { 
			$$value['id'] = $value['std']; 
		} else { 
		$$value['id'] = get_option( $value['id'] );
	}
}
	get_header(); 
	get_template_part( 'layout', 'index' ); ?>
	</div><!-- .content -->            
	<?php
		$sidebar_opts = '';
		if ( is_page() ) {
				$page_opts = get_post_meta( $post->ID, 'page_options', true );
            	$sidebar_opts = $page_opts['sidebar_opts'];
		}
		if ( ( $sidebar_opts == 'right' ) && ( !( $sidebar_opts == 'left' || $sidebar_opts == 'none' ) ) ){
			get_sidebar();
		}
		elseif ( ( $msa_sidebar == 'right' ) && ( !( $sidebar_opts == 'left' || $sidebar_opts == 'none' ) ) ) {
			get_sidebar();
		}
	?>
    	</div><!-- .primary_wrap --> 
	</div><!-- .primary -->     
<?php get_footer(); ?>